---
layout: m1x_soap
title: Downloadable Link Remove
---

<h3><a name="product_downloadable_link.remove-Module%3AComplexProductAPI"></a>Module: Complex Product API</h3>


<h4><a name="product_downloadable_link.remove-Resource%3Aproductdownloadablelink"></a>Resource: product_downloadable_link</h4>


<h5><a name="product_downloadable_link.remove-Method%3A"></a>Method:</h5>

<ul>
	<li>product_downloadable_link.remove (SOAP V1)</li>
	<li>catalogProductDownloadableLinkRemove (SOAP V2)</li>
</ul>


<p>Allows you to remove a link/sample from a downloadable product.</p>

<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId </td>
<td> Session ID </td>
</tr>
<tr>
<td> string </td>
<td> linkId/sampleId </td>
<td> Link/sample ID </td>
</tr>
<tr>
<td> string </td>
<td> resourceType </td>
<td> Resource type. Can have one of the following values: 'sample' or 'link' </td>
</tr>
</tbody></table>


<p><b>Return:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Description </th>
</tr>
<tr>
<td> boolean </td>
<td> True if the link/sample is removed from a downloadable product </td>
</tr>
</tbody></table>


<p><b>Faults</b>:</p>

<table><tbody>
<tr>
<th> Fault Code </th>
<th> Fault Message </th>
</tr>
<tr>
<td> 412 </td>
<td> Link or sample with specified ID was not found.&nbsp; <br class="atl-forced-newline" /> </td>
</tr>
<tr>
<td> 415 </td>
<td> Validation error has occurred. <br class="atl-forced-newline" /> </td>
</tr>
<tr>
<td> 416 </td>
<td> Unable to remove link. Details in error message. <br class="atl-forced-newline" /> </td>
</tr>
</tbody></table>


<h4><a name="product_downloadable_link.remove-Examples"></a>Examples</h4>

<h5><a name="product_downloadable_link.remove-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

$sampleId = 7;
$linkId = 9;

$resultSample = $proxy-&gt;call(
    $sessionId,
    'product_downloadable_link.remove',
    array($sampleId, 'sample')
);

$resultLink = $proxy-&gt;call(
    $sessionId,
    'product_downloadable_link.remove',
    array($linkId, 'link')
);</pre>
		</div>
</div></div>

<h5><a name="product_downloadable_link.remove-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy-&gt;catalogProductDownloadableLinkRemove($sessionId, '7', 'sample');
var_dump($result);</pre>
		</div>
</div></div>


<h5><a name="product_downloadable_link.remove-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey'));

$result = $proxy-&gt;catalogProductDownloadableLinkRemove((object)array('sessionId' =&gt; $sessionId-&gt;result, 'linkId' =&gt; '7', 'resourceType' =&gt; 'sample'));
var_dump($result-&gt;result);</pre>
		</div>
</div></div>


